package com.gitee.ixtf.vertx.internal.converter

import com.gitee.ixtf.vertx.ParameterConverter
import com.gitee.ixtf.vertx.internal.rc
import graphql.schema.DataFetchingEnvironment
import io.vertx.ext.web.FileUpload
import io.vertx.ext.web.RoutingContext

object FileUploadsParameterConverter : ParameterConverter<List<FileUpload>> {
  override suspend fun convert(env: DataFetchingEnvironment): List<FileUpload> = convert(env.rc())

  override suspend fun convert(rc: RoutingContext): List<FileUpload> = rc.fileUploads()
}
